home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / SOUND / MP3CONV.ZIP / !MP3Conv / docs / readme.IS1 < prev    next >
Text File  |  1995-07-14  |  11KB  |  346 lines

  1.  
  2.  
  3.           INTERNATIONAL ORGANIZATION FOR STANDARDIZATION
  4.            ORGANISATION INTERNATIONALE DE NORMALISATION
  5.                                ISO/IEC JTC1/SC29/WG 11
  6.             CODING OF MOVING PICTURES AND ASSOCIATED AUDIO
  7.  
  8.                                 MPEG94/
  9.                                 Nov. 1994
  10.  
  11. Source: Davis Pan (Motorola Inc.),
  12.             Chairman of the MPEG/audio ad hoc committee on software
  13.             simulation
  14. Title: Working Draft of MPEG/Audio Technical Report
  15.  
  16. Disclaimer of Warranty
  17.     These software programs are available to the user without any 
  18. license fee or royalty on an "as is" basis.  ISO disclaims any and all 
  19. warranties,  whether express, implied, or statuary, including any 
  20. implied warranties or merchantability or of fitness for a particular 
  21. purpose.  In no event shall ISO be liable for any incidental, punitive, 
  22. or consequential damages of any kind whatsoever arising from the 
  23. use of these programs.
  24.  
  25.     This disclaimer of warranty extends to the user of these 
  26. programs and user's customers, employees, agents, transferees, 
  27. successors, and assigns,
  28.  
  29.     ISO does not represent or warrant that the programs furnished 
  30. hereunder are free of infringement or any third-party patents, 
  31. copyrights or trade secrets.
  32.  
  33.     The purpose of this software is to provide a tool to help in the 
  34. learning and understanding of the MPEG/audio compression and 
  35. decompression algorithm.  It is not an efficient implementation.
  36.  
  37.  
  38.  
  39. Organization of this Report
  40.  
  41.     The main body of this report describes the organization and 
  42. use of the software.  The listings of the software, sample makefiles, 
  43. and test bitstreams are contained in the appendices:
  44.  
  45.  
  46.  
  47. Software Limitations
  48.  
  49.     The software implements levels I and II and psychophysical
  50. auditory models I and II as described in the ISO 3-11171 rev 1
  51. standard.  The input/output audio data may either be headerless raw
  52. 16 bit data or alternatively an AIFF formatted file (Audio Interchange
  53. File Format) with certain limitations. (For more information on the
  54. AIFF format see the postscript file /sgi/aiff-c.9.26.91.ps at the
  55. anonymous ftp site FTP.SGI.COM (192.48.153.1)).  The AIFF formatted
  56. file is a convenient way for storing sampling rate of the audio file.
  57.  
  58.     The encoder and decoder software are configured to output the
  59. coded audio bitstreams as a string of hexadecimal ascii characters. 
  60. For greater compression efficiency,  compile flag, BS_FORMAT, in 
  61. common.h can be switched to configure the bitstream reading and 
  62. writing routines to process raw binary bitstreams.
  63.  
  64.     This software has been run and verified on a large variety of
  65. computers and operating systems. In particular UNIX, MS_DOS (with
  66. MicroSoft C version 6), Macintosh, AIX Platform (RS6000) and Convex.
  67.  
  68.  
  69. Organization of the Code
  70.  
  71. The MPEG/audio Layer 1 and Layer 2 ** software package consists 
  72. of: 
  73.     21 data files tables
  74.     8 source files (*.c)
  75.     3 definitions files (*.h)
  76.     3 test bitstreams
  77.     * makefiles
  78.  
  79. ** There is a separate release note for the Layer 3 software
  80.  
  81.  
  82. Table 1 illustrates how the encoder and decoder is formed from the 
  83. component files.  In this table the definition files are enclosed in 
  84. parenthesis and listed immediately below the primary source file 
  85. which uses them.  The data file names are listed within braces and 
  86. also placed immediately below the source file which uses them.
  87.  
  88.             Table 1
  89.  
  90. encoder            common            decoder
  91. files            files            files
  92. ----------      ------------    ------------
  93. musicin.c        common.c        musicout.c
  94. encode.c        (common.h)        decode.c
  95. (encoder.h)         {alloc_0}          (decoder.h)
  96. {enwindow}        {alloc_1}        {dewindow}
  97. psy.c, subs.c        {alloc_2}
  98. {absthr_0}        {alloc_3}
  99. {absthr_1}
  100. {absthr_2}
  101. tonal.c
  102. {1cb0}, {1cb1}, {1cb2}
  103. {2cb0}, {2cb1}, {2cb2}
  104. {1th0}, {1th1}, {1th2}
  105. {2th0}, {2th1}, {2th2}
  106.  
  107. The test files orig.mpg and sine.dec are approximately
  108. 129026 and 387072 bytes. (Small variations are due to the blocking
  109. structures imposed by various disk operating systems.)
  110.  
  111.  
  112.  
  113. Software Installation
  114.  
  115.     Place are the 21 tables (absthr_*, *cb*, *th*, alloc_*)
  116. in a subdirectory called tables. Modify the common.h to reflect
  117. the compiler and machine you are using. (ie. uncomment one of the
  118. defs UNIX, MACINTOSH, MS_DOS, MSC60, AIX or CONVEX). Compile and
  119. link the files using one of the makefiles provided as a guideline.
  120. Note that the compiler may issue warning messages such as
  121.  
  122. common.c: In function `aiff_read_headers':
  123. common.c:686: warning: multi-character character constant
  124. common.c:687: warning: multi-character character constant
  125. common.c:703: warning: multi-character character constant
  126. common.c:735: warning: multi-character character constant
  127. common.c: In function `aiff_write_headers':
  128. common.c:825: warning: multi-character character constant
  129. common.c:826: warning: multi-character character constant
  130. common.c:827: warning: multi-character character constant
  131.  
  132. musicin.c:920: warning: static declaration for `usage' follows non-static
  133. musicin.c: In function `aiff_check':
  134. musicin.c:960: warning: multi-character character constant
  135.  
  136. These messages are dependent on the preprocessor directives specified
  137. in the common.h file. 
  138.  
  139.  
  140. Usuage
  141.  
  142.     To run the code type the name of the file followed by a 
  143. carriage return.  The programs will prompt you to input the 
  144. appropriate parameters.  The sound input file for the encoder should 
  145. be sound data, monophonic or stereophonic, sampled at 32, 44.1, or 
  146. 48 kHz with 16 bits per sample.  For stereophonic data the left 
  147. channel sample should precede the right channel sample.  The sound 
  148. output file of the decoder will be the same format as the sound input 
  149. file used by the decoder,  except for possible byte order differences 
  150. if the encoder and decoder programs are run on different computer
  151. systems which have different byte ordering conventions.
  152.  
  153.     Assuming the program musicin produces the MPEG coded file
  154. and musicout decodes the MPEG coded file, the programs can be run
  155. in either commandline mode or user prompt mode.  For example, on a 
  156. UNIX operating system, entering
  157.  
  158. musicin sine.dec sine.mpg
  159.  
  160. will run the program with the current built in defaults. The output
  161. from the program should appear as below. 
  162.  
  163. Encoding configuration:
  164. Layer=II   mode=stereo   extn=0   psy model=2
  165. samp frq=44.1 kHz   total bitrate=384 kbps
  166. de-emph=0   c/right=0   orig=0   errprot=0
  167. input file: 'sine.dec'   output file: 'sine.mpg'
  168. using bit allocation table alloc_1
  169. slots/frame = 1253
  170. frac SpF=0.878, tot bitrate=384 kbps, s freq=44.1 kHz
  171. Fractional number of slots, padding required
  172. {   0}absthr[][] sampling frequency index: 1
  173. {   1}{   2}{   3}{   4}{   5}{   6}{   7}...
  174.  
  175.  
  176. Alternatively, if you enter
  177.  
  178. musicin -help
  179.  
  180. The program will respond with the correct command-line usuage
  181. as shown below and then exit.
  182.  
  183. musicin: unrec option h
  184. musicin: -l layer must be 1 or 2, not p
  185. usage: musicin                         queries for all arguments, or
  186.        musicin [-l lay][-m mode][-p psy][-s sfrq][-b br][-d emp]
  187.           [-c][-o][-e] inputPCM [outBS]
  188. where
  189.  -l lay   use layer <lay> coding   (dflt    2)
  190.  -m mode  channel mode : s/d/j/m   (dflt    s)
  191.  -p psy   psychoacoustic model 1/2 (dflt    2)
  192.  -s sfrq  input smpl rate in kHz   (dflt 44.1)
  193.  -b br    total bitrate in kbps    (dflt  384)
  194.  -d emp   de-emphasis n/5/c        (dflt    n)
  195.  -c       mark as copyright
  196.  -o       mark as original
  197.  -e       add error protection
  198.  inputPCM input PCM sound file (standard or AIFF)
  199.  outBS    output bit stream of encoded audio (dflt inName+.mpg)
  200.  
  201.  
  202.  
  203. Finally, if you just enter
  204.  
  205. musicin
  206.  
  207. Then the program will prompt you for all the coding parameters before
  208. executing.
  209.  
  210. Enter PCM input file name <required>: sine.dec
  211. >>> PCM input file name is: sine.dec
  212. Enter MPEG encoded output file name <sine.dec.mpg>: sine.mpg
  213. >>> MPEG encoded output file name is: sine.mpg
  214. What is the sampling frequency? <44100>[Hz]: 
  215. >>> Default 44.1 kHz samp freq selected
  216. Which layer do you want to use?
  217. Available: Layer (1), Layer (<2>): 
  218. >>> Using default Layer 2
  219. Which mode do you want?
  220. Available: (<s>)tereo, (j)oint stereo, (d)ual channel, s(i)ngle Channel: 
  221. >>> Using default stereo mode
  222. Which psychoacoustic model do you want to use? <2>: 
  223. >>> Default model 2 selected
  224. What is the total bitrate? <384>[kbps]: 
  225. >>> Using default 384 kbps
  226. What type of de-emphasis should the decoder use?
  227. Available: (<n>)one, (5)0/15 microseconds, (c)citt j.17: 
  228. >>> Using default no de-emphasis
  229. Do you want to set the private bit? (y/<n>): 
  230. >>> Private bit not set
  231. Do you want error protection? (y/<n>): 
  232. >>> Error protection not used
  233. Is the material copyrighted? (y/<n>): 
  234. >>> Material not copyrighted
  235. Is this the original? (y/<n>): 
  236. >>> Material not original
  237. Do you wish to exit (last chance before encoding)? (y/<n>):
  238.  
  239.  
  240.  
  241. The software is functioning properly if the following equations hold:
  242. a. decoded(orig.mpg) == deco.dec
  243.     byte-swapping of deco.dec will be necessary for this 
  244.    equation to hold for little-endian computers
  245. b. encoded(deco.dec) == renc.mpg
  246.  
  247.     (encode with the default options except for the following:
  248.     48 kHz sampling rate and 256 kbits/sec coded bit rate)
  249.  
  250. If the bitstream tests fail, make sure that the following 
  251. variable types have at least the precision listed below:
  252.  
  253.     integer    -    16 or 32bits
  254.     float    -    32 bits
  255.     double    -    64 bits.
  256.  
  257.  
  258. Special notes for MSDOS users:
  259.  
  260. 1. The default bitrate option does not work.
  261. 2. The input/output filename defaults are not compatible with MSDOS.
  262. 3. The large memory model should be used for compilation.
  263.  
  264.  
  265.     Appendix  A contains the source code for the MPEG/audio 
  266. software, written in the C programming language.
  267.  
  268.  
  269.  
  270.     Appendix B contains sample "makefiles" which can be used to
  271. compile the software.  Before compiling, please examine the file
  272. common.h to determine if any of the "#define" declarations should be
  273. reactivated by removing it from a comment statement.
  274.  
  275.     Appendix  C contains a minimal bitstream test that can be used 
  276. to verify the proper operation of the MPEG/audio software.  The 
  277. bitstream test consists of three bitstreams:
  278.    orig.mpg    - The original, coded MPEG/audio bitstream
  279.    deco.dec    - The audio data resulting from decoding orig.mpg
  280.    renc.dec    - The encoded MPEG/audio bitstream obtained by 
  281.            encoding deco.dec
  282.  
  283.  
  284.  
  285. Notes on the Software
  286.  
  287.     The decoder program has a very crude implementation of 
  288. bitstream synchword detection.  It may not be able to correctly 
  289. decode valid bitstreams which have false synchword patterns in the 
  290. ancillary data portion of the bitstream.
  291.  
  292.  
  293.  
  294.  
  295. Appendix A MPEG/audio Source Code
  296. (included elsewhere)
  297.  
  298. Appendix B Sample "makefiles"
  299. (included elsewhere)
  300.  
  301. Appendix C Test Bitstreams
  302. (included elsewhere)
  303.  
  304. Appendix D List of Contributors
  305. Bill Aspromonte
  306. Shaun Astarabadi
  307. R. Bittner
  308. Karlheinz Brandenburg
  309. W. Joseph Carter
  310. Jack Chang
  311. Mike Coleman
  312. Johnathan Devine
  313. Ernst Eberlein
  314. Dan Ellis
  315. Peter Farrett
  316. Jean-Georges Fritsch
  317. Vlad Fruchter
  318. Hendrik Fuchs
  319. Bernhard Grill
  320. Amit Gulati
  321. Munsi Haque
  322. Chuck Hsiao
  323. Toshiyuki Ishino
  324. Masahiro Iwadare
  325. Earl Jennings
  326. James Johnston
  327. Leon v.d. Kerkhof
  328. Don Lee
  329. Mike Li
  330. Yu-Tang Lin
  331. Soren Neilsen
  332. Simao F. Campos Neto
  333. Mark Paley
  334. Davis Pan
  335. Tan Ah Peng
  336. Kevin Peterson
  337. Juan Pineda
  338. Ernst F. Schroeder
  339. Peter Siebert
  340. Jens Spille
  341. Sam Stewart
  342. Al Tabayoyon
  343. Kathy Wang
  344. Franz-Otto Witte
  345. Douglas Wong
  346.